package cn.felord.app.security;

/**
 * jwt token storage
 *
 * @author Dax
 * @since 13 :25  2018/9/21
 */
public interface JwtTokenStorage {

    /**
     * Put string.
     *
     * @param jwtPair the jwt entity
     * @param userId    the user id
     * @return the string
     */
    JwtPair put(JwtPair jwtPair, String userId);

    /**
     * Expire.
     *
     * @param userId the user id
     */
    void expire(String userId);

    /**
     * Refresh string.
     *
     * @param jwtPair the jwt entity
     * @param userId    the user id
     * @return the string
     */
    JwtPair refresh(JwtPair jwtPair, String userId);

    /**
     * Get.
     *
     * @param userId the user id
     * @return the string
     */
    JwtPair get(String userId);

}
